﻿using Business.Entity.Contabil.Pessoa.SubClass.Empresa;

namespace Business.Forms
{
    public partial class FormSelecionarEmpresa : DevExpress.XtraEditors.XtraForm
    {
        public FormSelecionarEmpresa()
        {
            InitializeComponent();
            empresaBindingSource.DataSource = EmpresaRepository.GetList();
        }

        public Empresa Empresa
        {
            get
            {
                return (Empresa) empresaBindingSource.Current;
            }
        }
        public static Empresa GetEmpresa()
        {
            var f = new FormSelecionarEmpresa();
            f.ShowDialog();
            return f.Empresa;
        }

        private void simpleButton1_Click(object sender, System.EventArgs e)
        {
            Close();
        }
    }
    
}